package org.jeecg.enums.meter;

public enum  MeterStatusEnum {
    USE_NORMAL(0, "正常"),
    USE_STOP(1, "停用"),
    USE_BLOCKED(2, "封存"),
    USE_CHANGE(3,"已换表");


    private Integer code;
    private String desc;

    MeterStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }


    public static String getDesc(Integer value) {
        if (value == null) return "";
        MeterStatusEnum[] enums = values();
        for (MeterStatusEnum typeEnum : enums) {
            if (value.intValue() == typeEnum.getCode().intValue()) {
                return typeEnum.desc;
            }
        }
        return "";
    }
}
